package com.czy.echat.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class LoginInfoDo {
    private Integer id;
    private Integer userId;
    private String userName;
    private Integer status;
    private Date createTime;

    public static LoginInfoBuilder builder(){
        return new LoginInfoBuilder();
    }

    public static class LoginInfoBuilder{
        private Integer id;
        private Integer userId;
        private String userName;
        private Integer status;
        private Date createTime;

        public LoginInfoBuilder id(Integer id) {
            this.id = id;
            return this;
        }

        public LoginInfoBuilder userId(Integer userId) {
            this.userId = userId;
            return this;
        }

        public LoginInfoBuilder userName(String userName) {
            this.userName = userName;
            return this;
        }

        public LoginInfoBuilder status(Integer status) {
            this.status = status;
            return this;
        }

        public LoginInfoBuilder createTime(Date createTime) {
            this.createTime = createTime;
            return this;
        }

        public LoginInfoDo build(){
            return new LoginInfoDo(id, userId, userName, status, createTime);
        }
    }
}
